package cz.moglum.bloodb.client;

import java.util.List;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import cz.moglum.bloodb.client.objects.BaseObject;

@RemoteServiceRelativePath("objectFactory")
public interface RPCObjectFactoryService extends RemoteService {
	
	/**
	 * @gwt.typeArgs <cz.moglum.bloodb.client.objects.BaseObject>
	 */
	List getAll(String type);
	
	// TODO finish other methods
	
	BaseObject getById(String type, String Id);

	public static class Util {

		public static RPCObjectFactoryServiceAsync getInstance() {

			return GWT.create(RPCObjectFactoryService.class);
		}
	}

}
